{extend name="public/base" /}
{block name='body'}
<div class="layui-container fly-marginTop fly-user-main">
    <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="user">
        <li class="layui-nav-item">
            <a href="{:url('user/home')}">
                <i class="layui-icon">&#xe609;</i>
                我的主页
            </a>
        </li>
        <li class="layui-nav-item layui-this">
            <a href="{:url('user/user')}">
                <i class="layui-icon">&#xe612;</i>
                用户中心
            </a>
        </li>
        <li class="layui-nav-item">
            <a href="{:url('user/set')}">
                <i class="layui-icon">&#xe620;</i>
                基本设置
            </a>
        </li>
        <!--<li class="layui-nav-item">-->
        <!--<a href="message.html">-->
        <!--<i class="layui-icon">&#xe611;</i>-->
        <!--我的消息-->
        <!--</a>-->
        <!--</li>-->
    </ul>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
        <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>


    <div class="fly-panel fly-panel-user" pad20>
        <!--
        <div class="fly-msg" style="margin-top: 15px;">
          您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
        </div>
        -->
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title" id="LAY_mine">
                <li data-type="mine-jie" lay-id="index" class="layui-this">我分享资源（<span>{$i.resource|comment_array_to_count}</span>）
                </li>
                <li data-type="collection" data-url="/collection/find/" lay-id="collection">我下载的资源（<span>{$i.downloads|comment_array_to_count}</span>）
                </li>
            </ul>
            <div class="layui-tab-content" style="padding: 20px 0;">
                <div class="layui-tab-item layui-show">
                    <ul class="mine-view jie-row">
                        {if condition='count($i.resource) > 0'}
                        {foreach $i.resource as $v}
                        <li>
                            <a class="jie-title"
                               href="{:url('home/index/detail')}?guid={$v.PK_ResourceGuid}">{$v.Title}</a>
                            <i>{$v.CreateTime}</i>
                            <a class="mine-edit" href="{:url('home/user/modifyShare')}?guid={$v.PK_ResourceGuid}">编辑</a>
                            <em>{$v.PageView}阅/{$v.Tops}顶</em>
                        </li>
                        {/foreach}
                        {else /}
                        <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i
                                style="font-size:14px;">你还没有任何分享</i></div>
                        {/if}
                    </ul>
                    <div id="LAY_page"></div>
                </div>
                <div class="layui-tab-item">


                    {if condition='count($i.downloads) > 0'}
                    {foreach $i.downloads as $v}
                    <ul class="mine-view jie-row">
                        <li>
                            <a class="jie-title" href="../jie/detail.html">{$v['resource']['Title']}</a>
                            <i>{$v.CreateTime}</i></li>
                    </ul>
                    {/foreach}
                    {else /}
                    <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i
                            style="font-size:14px;">暂无任何下载</i></div>
                    {/if}

                    <div id="LAY_page1"></div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}